﻿
#region Copyright & License
// --------------------------
// Copyright 2008 Daniel Gray
// --------------------------
// This file is part of Kale.
//
// Kale is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Kale is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with Kale.  If not, see <http://www.gnu.org/licenses/>.
#endregion
#region File details
// --------------------------------------------------------
// Filename          : Exceptions.cs
// Author            : Daniel Gray
// Created           : 15/04/2008
// --------------------------------------------------------
#endregion
            
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Kale.Core
{
   /// <summary>
   /// Exception thrown when an unknown store is specified.
   /// </summary>
   [Serializable]
   public class UnknownStoreException : ApplicationException
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownStoreException"/> class.
      /// </summary>
      public UnknownStoreException() : base() { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownStoreException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>
      public UnknownStoreException(string message) : base(message) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownStoreException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="innerException">The inner exception.</param>
      public UnknownStoreException(string message, Exception innerException) : base(message, innerException) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="UnknownStoreException"/> class.
      /// </summary>
      /// <param name="info">The object that holds the serialized object data.</param>
      /// <param name="context">The contextual information about the source or destination.</param>
      public UnknownStoreException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   [Serializable]
   public class UnsupportedNodeSourceException : ApplicationException
   {
      public UnsupportedNodeSourceException() : base() { }
      public UnsupportedNodeSourceException(string message) : base(message) { }
      public UnsupportedNodeSourceException(string message, Exception innerException) : base(message, innerException) { }
      public UnsupportedNodeSourceException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   [Serializable]
   public class UnknownImageSizeException : ApplicationException
   {
      public UnknownImageSizeException() : base() { }
      public UnknownImageSizeException(string message) : base(message) { }
      public UnknownImageSizeException(string message, Exception innerException) : base(message, innerException) { }
      public UnknownImageSizeException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   [Serializable]
   public class DuplicateNodeIdException : ApplicationException
   {
      public DuplicateNodeIdException() : base() { }
      public DuplicateNodeIdException(string message) : base(message) { }
      public DuplicateNodeIdException(string message, Exception innerException) : base(message, innerException) { }
      public DuplicateNodeIdException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   [Serializable]
   public class UnknownNodeIdException : ApplicationException
   {
      public UnknownNodeIdException() : base() { }
      public UnknownNodeIdException(string message) : base(message) { }
      public UnknownNodeIdException(string message, Exception innerException) : base(message, innerException) { }
      public UnknownNodeIdException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   [Serializable]
   public class NoHttpRuntimeException : ApplicationException
   {
      public NoHttpRuntimeException() : base() { }
      public NoHttpRuntimeException(string message) : base(message) { }
      public NoHttpRuntimeException(string message, Exception innerException) : base(message, innerException) { }
      public NoHttpRuntimeException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }

   
   /// <summary>
   /// Exception thrown when an error occurs in the creation of objects in a factory.
   /// </summary>            
   [Serializable]
   public class FactoryException : ApplicationException
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="FactoryException"/> class.
      /// </summary>            
      public FactoryException() : base() { }
      /// <summary>
      /// Initializes a new instance of the <see cref="FactoryException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>               
      public FactoryException(string message) : base(message) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="FactoryException"/> class.
      /// </summary>
      /// <param name="message">The message.</param>
      /// <param name="innerException">The inner exception.</param>               
      public FactoryException(string message, Exception innerException) : base(message, innerException) { }
      /// <summary>
      /// Initializes a new instance of the <see cref="FactoryException"/> class.
      /// </summary>
      /// <param name="info">The object that holds the serialized object data.</param>
      /// <param name="context">The contextual information about the source or destination.</param>               
      public FactoryException(SerializationInfo info, StreamingContext context) : base(info, context) { }
   }
                        
}
